package com.qianda.qdminiapp.common.exception;

/**
 * @ClassName ExceptionCode
 * @Author cw
 * @Date 2019/8/6 15:00
 * @Version 1.0
 */
public enum ExceptionCode {
    // 系统
    EX_HTTP_HANDLER_NOT_FOUND(90001, "没有找到对应的请求处理器"),

    EX_HTTP_METHOD_NOT_SUPPORTED(90002, "请求方式不支持"),

    EX_HTTP_MESSAGE_NOT_READABLE(90003, "不可识别的请求体内容"),

    EX_HTTP_MEDIA_TYPE_NOT_SUPPORTED(90004, "不被支持的媒体类型"),

    EX_HTTP_ACCESS_DENIED(90005, "访问被拒绝"),



    EX_HTTP_MISSING_PARAM(90006, "缺少必须的参数"),

    EX_HTTP_INPUT_NOT_VALID(90007, "输入的参数不合法"),

    EX_HTTP_NETWORK_ERROR(90008, "网络异常，请重试"),

    EX_HTTP_INPUT_NOT_ENTATY(90009, "实体不存在"),

    EX_HTTP_NO_PERM(90010, "权限不足"),


    // 公用
    EX_DELETE_EXISTS(10001, "已被使用，不可删除"),

    EX_FILE_UPLOAD_FAILD(10002, "上传文件失败!"),

    EX_IMAGE_ERROR(10003,"图片格式错误!"),

    // 管理员
    EX_SYS_USER_EXISTS(30001,"管理员已存在"),

    //角色组
    EX_ROLE_EXISTS(40001,"角色组名称已经存在"),

    EX_MENU_EXISTS(40002,"菜单名称已经存在"),
    EX_MENU_SUN_EXISTS(40003,"存在子菜单"),

    //业务
    EX_ORDER_FINISH(50001,"订单已完成"),
    EX_ORDER_SETTING_ERROR(50002,"设备设置失败"),
    EX_ORDER_COUNT_ERROR(50003,"此设备每人每天只能买一次"),
    EX_USER_BALLANCE_NOT_ENOUGH(50004,"用户余额不足"),
    EX_USER_QQB_NOT_ENOUGH(50006,"用户千千豆不足"),
    EX_USER_BALLANCE_PAY_ERROR(50005,"余额支付失败"),
    EX_USER_QQB_PAY_ERROR(50007,"千千豆支付失败"),
    EX_PAY_WAY_ERR(50008,"支付异常"),
    EX_ORDER_CREATE_ERROR(50009,"订单创建异常"),
    EX_CHARGING_TIME_OUT(50010, "访问超时!"),
    EX_BIND_PHONE(50011, "请绑定手机号"),
    EX_BIND_PHONE_EXIT(50012, "手机号已存在"),
    EX_DEVICE_IMEI_NULL(50013,"设备号为空"),
    EX_DEVICE_NOT_EXISTS(50014,"设备不存在"),
    EX_STORENOT_EXISTS(50015,"门店不存在"),
    EX_STORENOT_NOT_WORK(50016,"门店待运营"),
    EX_DEVICE_NOT_WORK(50017,"设备不为运营状态"),
    EX_DEVICE_CHECK_SELF_ERROR(50017,"设备自检超时"),

    EX_DEVICE_BLONG_ERROR(50018,"设备异常"),
    EX_COMPANY_ERRROR(50019,"公司已删除"),
    EX_DEVICE_COUNT_NOT_ENOUGH(50020,"设备毛巾数量不足"),
    EX_DEVICE_STATUS_1(50021,"缺水"),
    EX_DEVICE_STATUS_2(50022,"缺巾"),
    EX_DEVICE_STATUS_3(50023,"卷巾处卡巾"),
    EX_DEVICE_STATUS_4(50024,"切巾电机异常"),
    EX_DEVICE_STATUS_5(50025,"切巾处卡巾"),
    EX_DEVICE_STATUS_6(50026,"IC卡模块错误"),
    EX_DEVICE_NOT_ONLINE(50027,"设备不在线"),
    EX_DEVICE_ACCOUNT_ERROR(50028,"账户异常"),
    EX_ORDER_SHARE_ERROR(50029,"订单分润失败"),
    EX_DEVICE_ERROR(50030,"设备不存在"),
    EX_DEVICE_SET_SELF_ERROR(50031,"设备检测超时"),
    EX_USER_BLOCKING(50032,"账户已被冻结"),
    EX_TIME_OUT_HANDLER_ERROR(50033,"超时处理失败"),
    EX_REDPACKET_OVER_TIME(50034,"红包已过期，领取失败"),

    EX_SYS_ORGIN_ERROR(50035,"权限不足"),
    EX_WITHDRAW_AMT_ERROR(50047,"单笔提现金额必须在1到5000元之间"),
    EX_WITHDRAW_OPEN_ID_ERROR(50048,"openId错误"),
    EX_WITHDRAW_PAY_ERROR(50049,"付款错误"),
    EX_BALLANCE_NOT_ENOUGH(50050,"余额不足"),
    EX_SIGN_ERROR(50051,"签名错误"),
    EX_FREQUENT_ERROR(50052,"超过频率限制，请稍后再试"),
    EX_PAY_ENOUGH_ERROR(50053,"已经达到今日付款总额上限/已达到付款给此用户额度上限"),

    EX_USER_ID_ERROR(50054,"提现的微信账号未实名认证，不能付款"),

    EX_TODAY_PAY_ERROR(50055,"该用户今日付款次数超过限制。"),
    EX_COMPANY_PAY_PRO_ERROR(50056,"读取公司支付配置错误。"),
    EX_WITHDRAW_ACCOUNT_REALNAME_ERROR(50057,"提现人姓名与微信绑定的真实姓名不符，打款失败！"),

    EX_STORE_CURRENT_DAY_COUNT_ERROR(50058,"门店当天次数已满"),
    EX_SER_CURRENT_DAYC_COUNT_ERROR(50059,"用户当天次数已满"),

    EX_SYSTEM1(99998, "暂不支持微信支付"),


    EX_SYSTEM(99999, "系统繁忙，请稍后重试");


    private int code;
    private String message;

    private ExceptionCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int code() {
        return this.code;
    }

    public String message() {
        return this.message;
    }
}
